<%@ page language="java" pageEncoding="utf-8" %>
<%@ include file="/include/taglibs.jsp" %>

<script src="${path}/static/plugins/bootstrap-table/bootstrap-table.js"></script>

<script src="${path}/static/system/app/app.js"></script>

<script>
    window.onload = function(){
        var psel = document.getElementById("tag");
        psel.value = "android"; //设置
    };
</script>
<style>
    .fixed-table-pagination .pagination-detail,.fixed-table-pagination div.pagination{
        margin-top: 15px!important;
    }
</style>
<div>

    <table id="table"
           style="float:left "
           data-toggle="table"
           data-url="${path}/web/app/queryApp"
           data-height="400"
           data-side-pagination="server"
           data-pagination="true"
           data-page-list="[5, 10, 20, 50, 100, 200]"
           >
        <thead>
        <tr>
            <th data-field="devPlatform" data-formatter="shiyongduan">使用端</th>
            <th data-field="tagVersion">标签版本</th>
            <th data-field="devPlatform" data-formatter="App.show">设备平台</th>
            <%--<th data-field="version">版本号</th>--%>
            <th data-field="isForce" data-formatter="App.showCashState" >是否强制升级</th>
            <th data-field="updated">创建时间</th>
            <th data-formatter="operateFormatter" data-events="operateEvents">操作</th>
        </tr>
        </thead>
    </table>

    <div id="show-div" class="slidingmenu box-model box box-info">
        <div class="box box-info">
            <div class="box-header">
                <h3 class="box-title">查看</h3>
            </div>
            <div class="box-body">
                <form role="form" action="/web/app/update" method="post" id="upappform">
                    <input type="hidden" value="" name="id" />

                    <div class="form-group">
                        <label>使用端:</label>
                        <input type="text" class="form-control" name="shiyongduan" readonly>
                    </div>
                    <div class="form-group">
                        <label>设备平台:</label>
                        <input type="text" class="form-control" name="devPlatform" readonly>
                    </div>
                    <div class="form-group">
                        <label>标签版本:</label>
                        <input type="text" class="form-control" name="tagVersion" readonly>
                    </div>
                    <div class="form-group">
                        <label>版本号:</label>
                        <input type="text" class="form-control" name="version" readonly>
                    </div>
                    <div class="form-group">
                        <label>下载地址:</label>
                        <input type="text" class="form-control" name="url" readonly>
                    </div>
                    <div class="form-group">
                        <label>升级说明:</label>
                        <textarea  name="updateInfo" class="form-control" readonly></textarea>
                    </div>
                    <div class="form-group">
                        <label>升级时间:</label>
                        <input type="text" class="form-control" name="updated" readonly>
                    </div>
                    <div class="form-group">
                        <label>是否强制升级</label>
                        <div class="radio">
                            <label>
                                <input type="radio" name="isForce" id="radi1"  value="0">
                                否
                            </label>
                        </div>
                        <div class="radio">
                            <label>
                                <input type="radio" name="isForce" id="radi2" value="1">
                                是
                            </label>
                        </div>
                    </div>
                </form>
                <div class="box-footer">
                    <button class="btn btn-danger close-model">关闭</button>
                </div>
            </div>
        </div>
    </div>

    <div id="editapp-div" class="slidingmenu box-model box box-info">
        <div class="box box-info">
            <div class="box-header">
                <h3 class="box-title">升级</h3>
            </div>
            <div class="box-body">
                <form role="form" action="${path}/web/app/editById" method="post" id="editappform">
                    <input type="hidden" value="" name="id" />

                    <div class="form-group">
                        <label>标签版本:</label>
                        <input type="text" class="form-control" name="tagversion" required="required" />
                    </div>

                    <div class="form-group">
                        <label>版本号:</label>
                        <input type="text" class="form-control" name="version" required="required" readonly />
                    </div>
                    <%--<div class="form-group">--%>
                        <%--<label>设备平台:</label>--%>
                        <%--<div class="radio">--%>
                            <%--<label>--%>
                                <%--<input type="radio" name="devPlatform" flag="1" value="1">--%>
                                <%--android--%>
                            <%--</label>--%>
                        <%--</div>--%>
                        <%--<div class="radio">--%>
                            <%--<label>--%>
                                <%--<input type="radio" name="devPlatform" flag="2" value="2">--%>
                                <%--ios--%>
                            <%--</label>--%>
                        <%--</div>--%>
                    <%--</div>--%>
                    <div class="form-group">
                        <label>下载地址:</label>
                        <input type="text" class="form-control" name="url" required="required">
                    </div>
                    <div class="form-group">
                        <label>升级说明:</label>
                        <textarea name="updateInfo" class="form-control"></textarea>
                    </div>
                    <div class="form-group">
                        <label>是否强制升级</label>
                        <div class="radio">
                            <label>
                                <input type="radio" name="isForce" id="radi3"  value="0">
                                否
                            </label>
                        </div>
                        <div class="radio">
                            <label>
                                <input type="radio" name="isForce" id="radi4" value="1">
                                是
                            </label>
                        </div>
                    </div>
                </form>
                <div class="box-footer">
                    <button class="btn btn-info" id="editappsave">保存</button>
                    &nbsp;
                    <button class="btn btn-danger close-model">关闭</button>
                </div>
            </div>
        </div>
    </div>

    <div id="showapp-div" class="slidingmenu box-model box box-info">
        <div class="box box-info">
            <div class="box-header">
                <h3 class="box-title">APP版本编辑</h3>
            </div>
            <div class="box-body">
                <form role="form" id="showapp">

                    <input type="hidden" value="" name="id" />
                    <div class="form-group">
                        <label>版本号:</label>
                        <input type="text" class="form-control" name="version">
                    </div>
                    <div class="form-group">
                        <label>设备平台:</label>
                        <input type="text" class="form-control" name="devPlatform">
                    </div>
                    <div class="form-group">
                        <label>升级说明:</label>
                        <textarea  name="updateInfo" class="form-control"></textarea>
                    </div>
                    <div class="form-group">
                        <label>下载地址:</label>
                        <input type="text" class="form-control" name="url">
                    </div>

                    <div class="form-group">
                        <label>升级时间:</label>
                        <input type="text" class="form-control" name="updated">
                    </div>
                    <div class="form-group">
                        <label>是否强制升级</label>
                        <div class="radio">
                            <label>
                                <input type="radio" name="isForce" id="radi5"  value="0">
                                否
                            </label>
                        </div>
                        <div class="radio">
                            <label>
                                <input type="radio" name="isForce" id="radi6" value="1">
                                是
                            </label>
                        </div>
                    </div>
                </form>
                <div class="box-footer">
                    <button class="btn btn-info">保存</button>
                    &nbsp;
                    <button class="btn btn-danger close-model">关闭</button>
                </div>
            </div>
        </div>
    </div>
</div>
